Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle AnnotationTarget.VALUE_PARAMETER for property declarations. #1216

Merged
merged 2 commits into from
Nov 29, 2022

Conversation

neetopia
Copy link
Contributor

This special handling is needed when an annotation has implicit use site
target restriction declared at that annotations declaration site. This is
only happening for properties declared in constructor parameter because in
constructor parameter, the use site is value parameter which does not violate
annotation target contract, and annotations gets carried over to its actual
property, therefore need to read the annotation declaration and resolve for targets.

The logic is unfortunately, ugly, wonder if there is any utility functions to check it simpler.

fixes #1198

@neetopia neetopia requested a review from ting-yuan November 29, 2022 02:42
This special handling is needed when an annotation has implicit use site
target restriction declared at that annotations declaration site. This is
only happening for properties declared in constructor parameter because in
constructor parameter, the use site is value parameter which does not violate
annotation target contract, and annotations gets carried over to its actual
property, therefore need to read the annotation declaration and resolve for targets.
@neetopia neetopia force-pushed the value-parameter-target branch from b829b23 to f3fd977 Compare November 29, 2022 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent annotations when processing source versus (precompiled) class.
2 participants